package com.lxd.mappers;

import com.lxd.entity.po.Registration;
import org.apache.ibatis.annotations.Param;

/**
 *  数据库操作接口
 */
public interface RegistrationMapper<T,P> extends BaseMapper<T,P> {

	/**
	 * 根据Id更新
	 */
	 Integer updateById(@Param("bean") T t,@Param("id") Long id);


	/**
	 * 根据Id删除
	 */
	 Integer deleteById(@Param("id") Long id);


	/**
	 * 根据Id获取对象
	 */
	 T selectById(@Param("id") Long id);


    Registration selectOneByUserIdAndActivityId(@Param("userId")Long userId,@Param("activityId") Long activityId);
	Registration selectCountByUserIdAndClubId(@Param("userId") Long userId, @Param("clubId") Long clubId);
}
